package top.toptimus.dto.pmc;

import lombok.Data;
import lombok.NoArgsConstructor;
import top.toptimus.dto.order.orderSync.orderCommit.OrderCommitOverviewDto;

import java.util.ArrayList;
import java.util.List;

/**
 * 未排产的客户款式
 */
@NoArgsConstructor
@Data
public class NoneScheduledStyleDTO {
    private String refStyleId;
    private String styleNameCn;
    private String shopId;
    private Double quantity;    //  订单数量
    private String status;
    private List<OrderCommitOverviewDto> orderCommitOverviewDtos = new ArrayList<>();

    public NoneScheduledStyleDTO(
            String refStyleId,
            String styleNameCn,
            String shopId,
            String status
    ) {
        this.refStyleId = refStyleId;
        this.styleNameCn = styleNameCn;
        this.shopId = shopId;
        this.status = status;
    }

    public NoneScheduledStyleDTO build(Double quantity) {
        this.quantity = quantity;
        return this;
    }

    /**
     * 页面订单明细
     *
     * @param orderCommitOverviewDto 订单DTO一览
     */
    public void build(OrderCommitOverviewDto orderCommitOverviewDto) {
        this.orderCommitOverviewDtos.add(orderCommitOverviewDto);
    }
}
